package com.foreverwin.jzymes.production.grind.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.foreverwin.jzymes.production.grind.mapper.GrindCheckMapper;
import com.foreverwin.jzymes.production.grind.domain.GrindCheck;
import com.foreverwin.jzymes.production.grind.service.IGrindCheckService;

/**
 * DDG检验 服务层实现
 * 
 * @author ervin
 * @date 2019-03-19
 */
@Service
public class GrindCheckServiceImpl implements IGrindCheckService
{
	@Autowired
	private GrindCheckMapper grindCheckMapper;

	/**
     * 查询DDG检验信息
     * 
     * @param handle DDG检验ID
     * @return DDG检验信息
     */
    @Override
	public GrindCheck selectGrindCheckById(String handle)
	{
	    return grindCheckMapper.selectGrindCheckById(handle);
	}
	
	/**
     * 查询DDG检验列表
     * 
     * @param grindCheck DDG检验信息
     * @return DDG检验集合
     */
	@Override
	public List<GrindCheck> selectGrindCheckList(GrindCheck grindCheck)
	{
	    return grindCheckMapper.selectGrindCheckList(grindCheck);
	}
	
    /**
     * 新增DDG检验
     * 
     * @param grindCheck DDG检验信息
     * @return 结果
     */
	@Override
	public int insertGrindCheck(GrindCheck grindCheck)
	{
	    return grindCheckMapper.insertGrindCheck(grindCheck);
	}
	
	/**
     * 修改DDG检验
     * 
     * @param grindCheck DDG检验信息
     * @return 结果
     */
	@Override
	public int updateGrindCheck(GrindCheck grindCheck)
	{
	    return grindCheckMapper.updateGrindCheck(grindCheck);
	}

	/**
     * 删除DDG检验对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteGrindCheckByIds(String ids)
	{
		return grindCheckMapper.deleteGrindCheckByIds(ids.split(","));
	}
	
}
